<%@ page contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ include file="/WEB-INF/jsp/includes/common.jsp"%>
<html>
	<head>
		<%@ include file="/WEB-INF/jsp/includes/head.jsp"%>
		<script type="text/javascript" src="${ctx }/js/lib/jquery.validate.js"></script>
		<script type="text/javascript" src="${ctx }/js/lib/jquery.validate.messages_cn.js"></script>
		<script type="text/javascript" src="${ctx }/js/base/validateinfo.js"></script>
		<script type="text/javascript" src="${ctx }/js/activity/activelist.js"></script>
	</head>
	<body>
		<%@ include file="/WEB-INF/jsp/includes/logo.jsp"%>
		<div class="container">
			<div class="main clearfix">
				<%@ include file="/WEB-INF/jsp/includes/nav.jsp"%>	
				<div class="container2 fl">
					<div class="main">
						<h4><span>抢吧后台&nbsp;>&nbsp;</span><span class="fb"><a href="${ctx }/activity/index.do">活动列表</a></span></h4>
						<div class="hd mt10 mb10 clearfix">
							<a href="${ctx }/activity/toSavePage.do" class="btn-add-active btn btn1 fl">添加活动</a>
							<div class="opt fr">
								<form action="${ctx }/activity/index.do" method="post" id="searchActiveForm">
									<p class="validate-tips">${error }</p>
									<select name="status">
										<nad:option name="status" list="#{'':-活动状态-,1:尚未进行,2:正在进行,3:已经结束,4:活动关闭}" />
									</select>
									活动类型：<input class="mr10 ml10" type="text"  value="${activityType }"  name="activityType"/>
									活动名称：<input class="mr10" type="text"    value="${activityName }" name="activityName" />
									<input type="button" class="btn-search btn btn2" value="搜索"  id="searchActiveButton"/>
								</form>
							</div>
						</div>
						<div class="cont mt10">
							<table cellspacing="0" border="1">
								<thead>
									<tr>
										<th width="50">编号</th>
										<th width="160">活动标题</th>
										<th width="170">活动时间</th>
										<th width="70">活动状态</th>
										<th width="80">活动分类</th>
										<th width="70">剩余G币</th>
										<th width="70">创建人</th>
										<th width="100">操作</th>
									</tr>
								</thead>
								<c:if test="${page.total>0 }">
								<nad:table dataList="${page.dataList }" trans="${trans}">
									<tbody>
										<nad:row>
											<c:if test="${DATALIST_CURRENTROW%2==0 }">
												<tr class="odd">
											</c:if>
											<c:if test="${DATALIST_CURRENTROW%2==1 }">
												<tr class="even">
											</c:if>
											<td>${id}</td>
											<td>
												<img src="<nad:col name="image1"/>" width="120" height="80" />
												<br />
												<span><nad:col name="activeName"/></span>
											</td>
											<td>
												<span>开始：<nad:col name="startTime"/></span>
												<span>结束：<nad:col name="endTime"/></span>
											</td>
											<td><nad:col name="faceStatus"/></td>
											<td><nad:col name="gameType"/></td>
											<td><nad:col name="costG" format="#"/></td>
											<td><nad:col name="createPeople"/></td>
											<td>
												<span>
													<c:if test="${faceStatus==1 or faceStatus==4}">
														<a href="${ctx }/activity/toUpdatePage.do?activityId=<nad:col name="id"/>">编辑基本信息</a>
													</c:if>
												</span>
												<span>
													<a href="${ctx }/award/index.do?activeId=<nad:col name="id"/>">奖品管理</a>
													<c:if test="${faceStatus==1 or faceStatus==4}">
														<a href="#" class="recharge-gold-link">充值</a>
													</c:if>
												</span>
												<span>
												<c:if test="${awardStatus > -1}">
													<a target="_blank" href="${ctx }/activity/preview.do?activeId=<nad:col name="id"/>" >活动预览</a>
												</c:if>
												<c:if test="${awardStatus == -1}">
													<a href="javascript:showTips('奖品信息未完善，请完善后进行预览！')" >活动预览</a>
												</c:if>
												</span>
												<span>
													<c:if test="${publish==0}">
														<a href="#" class="publish-active-link">发布活动</a>
													</c:if>
													<c:if test="${publish==1}">
														活动已发布
													</c:if>
														<a href="#" class="active-close">
															<c:if test="${faceStatus==2 or faceStatus==4}">
																<nad:col name="status"/>
															</c:if>
														</a>
												</span>
												<span>
													<c:if test="${faceStatus==1}">
														<a href="#" class="is-delete">删除</a>
													</c:if>
													<c:if test="${publish==1}">
														<a href="#" class="view-fragment-link">外嵌窗口</a>
													</c:if>
												</span>
											</td>
											</tr>
										</nad:row>
									</tbody>
								</nad:table>
								</c:if>
								<c:if test="${page.total<=0 }">
									<tr class="no-results">
										<td colspan="100%">未查询到结果！</td>
									</tr>
								</c:if>
							</table>
						</div>
						<div class="ft mt10 clearfix pageno">
							<c:if test="${page.total>0 }">
								<nad:pagebar page="${page }" action="${ctx }/activity/index.do" />
							</c:if>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<!-- 弹出层 -->
		<!-- 2.充值 -->
		<div id="rechargeGold" title="充值" class="hidden">
			<form action="${ctx }/activity/rechargeGold.do" method="post" id="rechargeGoldForm">
			<p class="validate-tips">${error }</p>
				<fieldset>
					<p class="validate-tips hidden"></p>
					<p class="item">
						<label for="accountNo"><i>*</i>商城账号：</label>
						<input type="text" name="accountNo" id="accountNo" class="text ui-widget-content ui-corner-all" />
					</p>
					<p class="item">
						<label for="accountPass"><i>*</i>账号密码：</label>
						<input type="password" name="accountPass" id="accountPass" class="text ui-widget-content ui-corner-all" />
					</p>
					<p class="item">
						<label for="rechargeMoney"><i>*</i>充值金额：</label>
						<input type="text" name="rechargeMoney" id="rechargeMoney" class="text ui-widget-content ui-corner-all" />
					</p>
					<input type="hidden" id="acId" name="acId"/>
				</fieldset>
			</form>
		</div>
		
		<!-- 2.查看碎片 -->
		<input type="hidden" id="jsUrl" value="${jsURL}"/>
		<input type="hidden" id="cssUrl" value="${cssURL }"/>
		<div id="viewFragment" title="查看碎片" class="hidden">
			<p class="fragment-help">
				<a href="${ctx }/activity/fragHelp.do" target="_blank">使用说明</a>
			</p>
			<div class="fragment-js i-position">
				<p class="title">确保页面引入jQuery</p>
				<p class="item">
					<label>引入jQuery：</label>
					<textarea class="text ui-widget-content ui-corner-all" readonly="readonly" style="height: 30px;">&lt;script type="text/javascript" src="http://ue8.17173.itc.cn/cache/lib/v1/jquery-1.4.min.js "&gt;&lt;/script&gt;</textarea>
					<button class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
						<span class="ui-button-text">复制</span>
					</button>
				</p>
			</div>
			<div class="fragment-js i-position">
				<p class="title">嵌入位置说明</p>
				<p class="item">
					<label>嵌入位置ID标识：</label>
					<textarea class="text ui-widget-content ui-corner-all" readonly="readonly">&lt;div id="diskWrapper"&gt;&lt;/div&gt;</textarea>
					<button class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
						<span class="ui-button-text">复制</span>
					</button>
				</p>
			</div>
			<div class="fragment-js">
				<p class="title">不带中奖名单</p>
				<p class="item">
					<label>250版：</label>
					<textarea class="text ui-widget-content ui-corner-all" readonly="readonly">
					</textarea>
					<button class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
						<span class="ui-button-text">复制</span>
					</button>
				</p>
				<p class="item">
					<label>420版：</label>
					<textarea class="text ui-widget-content ui-corner-all" readonly="readonly">
					</textarea>
					<button class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
						<span class="ui-button-text">复制</span>
					</button>
				</p>
				<p class="item">
					<label>580版：</label>
					<textarea class="text ui-widget-content ui-corner-all" readonly="readonly">
					</textarea>
					<button class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
						<span class="ui-button-text">复制</span>
					</button>
				</p>
			</div>
			<div class="fragment-js">
				<p class="title">带中奖名单</p>
				<p class="item">
					<label>800版：</label>
					<textarea class="text ui-widget-content ui-corner-all" readonly="readonly">
					</textarea>
					<button class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
						<span class="ui-button-text">复制</span>
					</button>
				</p>
				<p class="item">
					<label>900版：</label>
					<textarea class="text ui-widget-content ui-corner-all" readonly="readonly">
					</textarea>
					<button class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
						<span class="ui-button-text">复制</span>
					</button>
				</p>
			</div>
		</div>
		<%@ include file="/WEB-INF/jsp/includes/bottom.jsp" %>
	</body>
</html>


